home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / cdev / clrnxtwd.sit / Test code.c < prev    next >
MacBinary  |  1989-11-03  |  3.8 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: Test code.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Fri Nov 3 13:36:20 1989, modified Fri Nov 3 13:36:20 1989, creator Think C, type ASCII, 3327 bytes "Test code.c" , at 0xd7f 352 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 54 65 73 74 20 63 | 6f 64 65 2e 63 00 00 00 |..Test c|ode.c...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 0c ff 00 | 00 01 60 a1 77 8b 24 a1 |........|..`.w.$.|
|00000060| 77 8b 24 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |w.$.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 c7 61 00 00 |........|.....a..|
|00000080| 2f 2a 0d 20 2a 20 4e 65 | 58 54 20 57 44 45 46 20 |/*. * Ne|XT WDEF |
|00000090| 74 65 73 74 69 6e 67 20 | 63 6f 64 65 0d 20 2a 2f |testing |code. */|
|000000a0| 0d 0d 23 69 6e 63 6c 75 | 64 65 20 3c 47 6c 6f 62 |..#inclu|de <Glob|
|000000b0| 61 6c 2e 68 3e 0d 0d 74 | 79 70 65 64 65 66 20 73 |al.h>..t|ypedef s|
|000000c0| 74 72 75 63 74 20 7b 0d | 09 69 6e 74 09 09 6a 75 |truct {.|.int..ju|
|000000d0| 6d 70 3b 0d 09 6c 6f 6e | 67 09 61 64 64 3b 0d 7d |mp;..lon|g.add;.}|
|000000e0| 20 64 65 66 52 65 63 2c | 20 2a 64 65 66 50 74 72 | defRec,| *defPtr|
|000000f0| 2c 20 2a 2a 64 65 66 48 | 64 6c 3b 0d 0d 64 65 66 |, **defH|dl;..def|
|00000100| 48 64 6c 09 09 74 68 65 | 44 65 66 3b 0d 45 76 65 |Hdl..the|Def;.Eve|
|00000110| 6e 74 52 65 63 6f 72 64 | 09 65 76 65 6e 74 3b 0d |ntRecord|.event;.|
|00000120| 42 6f 6f 6c 65 61 6e 09 | 09 68 61 73 51 75 69 74 |Boolean.|.hasQuit|
|00000130| 20 3d 20 66 61 6c 73 65 | 3b 0d 0d 6d 61 69 6e 28 | = false|;..main(|
|00000140| 29 0d 7b 0d 09 42 6f 6f | 6c 65 61 6e 09 09 67 6f |).{..Boo|lean..go|
|00000150| 74 45 76 65 6e 74 3b 0d | 09 57 69 6e 64 6f 77 50 |tEvent;.|.WindowP|
|00000160| 74 72 09 77 69 6e 64 6f | 77 3b 0d 09 69 6e 74 09 |tr.windo|w;..int.|
|00000170| 09 09 69 3b 0d 09 48 61 | 6e 64 6c 65 09 09 6d 65 |..i;..Ha|ndle..me|
|00000180| 6e 75 42 61 72 3b 0d 09 | 52 65 63 74 09 09 77 52 |nuBar;..|Rect..wR|
|00000190| 65 63 74 3b 0d 09 70 61 | 73 63 61 6c 20 6c 6f 6e |ect;..pa|scal lon|
|000001a0| 67 20 6e 65 78 74 57 44 | 45 46 28 2f 2a 20 76 61 |g nextWD|EF(/* va|
|000001b0| 72 69 61 74 69 6f 6e 2c | 20 77 69 6e 64 6f 77 2c |riation,| window,|
|000001c0| 20 6d 65 73 73 61 67 65 | 2c 20 70 61 72 61 6d 65 | message|, parame|
|000001d0| 74 65 72 20 2a 2f 29 3b | 0d 0d 09 49 6e 69 74 47 |ter */);|...InitG|
|000001e0| 72 61 66 28 26 74 68 65 | 50 6f 72 74 29 3b 0d 09 |raf(&the|Port);..|
|000001f0| 49 6e 69 74 43 75 72 73 | 6f 72 28 29 3b 0d 09 49 |InitCurs|or();..I|
|00000200| 6e 69 74 46 6f 6e 74 73 | 28 29 3b 0d 09 49 6e 69 |nitFonts|();..Ini|
|00000210| 74 57 69 6e 64 6f 77 73 | 28 29 3b 0d 09 49 6e 69 |tWindows|();..Ini|
|00000220| 74 4d 65 6e 75 73 28 29 | 3b 0d 09 54 45 49 6e 69 |tMenus()|;..TEIni|
|00000230| 74 28 29 3b 0d 09 49 6e | 69 74 44 69 61 6c 6f 67 |t();..In|itDialog|
|00000240| 73 28 6e 69 6c 29 3b 0d | 0d 09 4d 6f 72 65 4d 61 |s(nil);.|..MoreMa|
|00000250| 73 74 65 72 73 28 29 3b | 0d 09 4d 6f 72 65 4d 61 |sters();|..MoreMa|
|00000260| 73 74 65 72 73 28 29 3b | 0d 09 0d 09 46 6c 75 73 |sters();|....Flus|
|00000270| 68 45 76 65 6e 74 73 28 | 65 76 65 72 79 45 76 65 |hEvents(|everyEve|
|00000280| 6e 74 2c 20 30 29 3b 09 | 2f 2a 20 66 6c 75 73 68 |nt, 0);.|/* flush|
|00000290| 20 74 6f 69 6c 65 74 20 | 2a 2f 0d 09 47 65 74 4e | toilet |*/..GetN|
|000002a0| 65 78 74 45 76 65 6e 74 | 28 65 76 65 72 79 45 76 |extEvent|(everyEv|
|000002b0| 65 6e 74 2c 20 26 65 76 | 65 6e 74 29 3b 0d 09 47 |ent, &ev|ent);..G|
|000002c0| 65 74 4e 65 78 74 45 76 | 65 6e 74 28 65 76 65 72 |etNextEv|ent(ever|
|000002d0| 79 45 76 65 6e 74 2c 20 | 26 65 76 65 6e 74 29 3b |yEvent, |&event);|
|000002e0| 0d 09 0d 09 74 68 65 44 | 65 66 20 3d 20 28 64 65 |....theD|ef = (de|
|000002f0| 66 48 64 6c 29 47 65 74 | 52 65 73 6f 75 72 63 65 |fHdl)Get|Resource|
|00000300| 28 27 57 44 45 46 27 2c | 20 31 30 29 3b 0d 09 28 |('WDEF',| 10);..(|
|00000310| 2a 2a 74 68 65 44 65 66 | 29 2e 6a 75 6d 70 20 3d |**theDef|).jump =|
|00000320| 20 30 78 34 65 66 39 3b | 0d 09 28 2a 2a 74 68 65 | 0x4ef9;|..(**the|
|00000330| 44 65 66 29 2e 61 64 64 | 20 3d 20 28 6c 6f 6e 67 |Def).add| = (long|
|00000340| 29 6e 65 78 74 57 44 45 | 46 3b 0d 09 0d 09 6d 65 |)nextWDE|F;....me|
|00000350| 6e 75 42 61 72 20 3d 20 | 47 65 74 4e 65 77 4d 42 |nuBar = |GetNewMB|
|00000360| 61 72 28 31 32 38 29 3b | 0d 09 53 65 74 4d 65 6e |ar(128);|..SetMen|
|00000370| 75 42 61 72 28 6d 65 6e | 75 42 61 72 29 3b 0d 09 |uBar(men|uBar);..|
|00000380| 44 69 73 70 6f 73 48 61 | 6e 64 6c 65 28 6d 65 6e |DisposHa|ndle(men|
|00000390| 75 42 61 72 29 3b 0d 09 | 41 64 64 52 65 73 4d 65 |uBar);..|AddResMe|
|000003a0| 6e 75 28 47 65 74 4d 48 | 61 6e 64 6c 65 28 31 32 |nu(GetMH|andle(12|
|000003b0| 38 29 2c 20 27 44 52 56 | 52 27 29 3b 0d 09 44 72 |8), 'DRV|R');..Dr|
|000003c0| 61 77 4d 65 6e 75 42 61 | 72 28 29 3b 0d 09 0d 09 |awMenuBa|r();....|
|000003d0| 53 65 74 52 65 63 74 28 | 26 77 52 65 63 74 2c 20 |SetRect(|&wRect, |
|000003e0| 32 30 2c 20 36 30 2c 20 | 34 32 30 2c 20 33 36 30 |20, 60, |420, 360|
|000003f0| 29 3b 0d 09 77 69 6e 64 | 6f 77 20 3d 20 4e 65 77 |);..wind|ow = New|
|00000400| 57 69 6e 64 6f 77 28 28 | 57 69 6e 64 6f 77 50 65 |Window((|WindowPe|
|00000410| 65 6b 29 6e 69 6c 2c 20 | 26 77 52 65 63 74 2c 20 |ek)nil, |&wRect, |
|00000420| 22 5c 70 54 68 69 73 20 | 69 73 20 6f 62 76 69 6f |"\pThis |is obvio|
|00000430| 75 73 6c 79 20 61 20 76 | 65 72 79 20 6e 69 63 65 |usly a v|ery nice|
|00000440| 20 77 69 6e 64 6f 77 2e | 22 2c 20 74 72 75 65 2c | window.|", true,|
|00000450| 20 31 36 38 2c 20 28 57 | 69 6e 64 6f 77 50 65 65 | 168, (W|indowPee|
|00000460| 6b 29 2d 31 6c 2c 20 74 | 72 75 65 2c 20 30 29 3b |k)-1l, t|rue, 0);|
|00000470| 0d 09 4f 66 66 73 65 74 | 52 65 63 74 28 26 77 52 |..Offset|Rect(&wR|
|00000480| 65 63 74 2c 20 34 30 2c | 20 34 30 29 3b 0d 09 77 |ect, 40,| 40);..w|
|00000490| 69 6e 64 6f 77 20 3d 20 | 4e 65 77 43 57 69 6e 64 |indow = |NewCWind|
|000004a0| 6f 77 28 6e 69 6c 2c 20 | 26 77 52 65 63 74 2c 20 |ow(nil, |&wRect, |
|000004b0| 22 5c 70 54 68 65 20 32 | 6e 64 20 77 69 6e 64 6f |"\pThe 2|nd windo|
|000004c0| 77 21 22 2c 20 74 72 75 | 65 2c 20 31 36 38 2c 20 |w!", tru|e, 168, |
|000004d0| 2d 31 6c 2c 20 74 72 75 | 65 2c 20 30 29 3b 0d 09 |-1l, tru|e, 0);..|
|000004e0| 0d 09 64 6f 20 7b 0d 09 | 09 53 79 73 74 65 6d 54 |..do {..|.SystemT|
|000004f0| 61 73 6b 28 29 3b 0d 09 | 09 67 6f 74 45 76 65 6e |ask();..|.gotEven|
|00000500| 74 20 3d 20 47 65 74 4e | 65 78 74 45 76 65 6e 74 |t = GetN|extEvent|
|00000510| 28 65 76 65 72 79 45 76 | 65 6e 74 2c 20 26 65 76 |(everyEv|ent, &ev|
|00000520| 65 6e 74 29 3b 0d 09 09 | 0d 09 09 69 66 20 28 67 |ent);...|...if (g|
|00000530| 6f 74 45 76 65 6e 74 29 | 20 7b 0d 09 09 09 73 77 |otEvent)| {....sw|
|00000540| 69 74 63 68 28 65 76 65 | 6e 74 2e 77 68 61 74 29 |itch(eve|nt.what)|
|00000550| 20 7b 0d 09 09 09 63 61 | 73 65 20 6d 6f 75 73 65 | {....ca|se mouse|
|00000560| 44 6f 77 6e 3a 0d 09 09 | 09 09 44 6f 4d 6f 75 73 |Down:...|..DoMous|
|00000570| 65 44 6f 77 6e 28 29 3b | 0d 09 09 09 09 62 72 65 |eDown();|.....bre|
|00000580| 61 6b 3b 0d 09 09 09 63 | 61 73 65 20 75 70 64 61 |ak;....c|ase upda|
|00000590| 74 65 45 76 74 3a 0d 09 | 09 09 09 44 6f 55 70 64 |teEvt:..|...DoUpd|
|000005a0| 61 74 65 28 28 57 69 6e | 64 6f 77 50 74 72 29 20 |ate((Win|dowPtr) |
|000005b0| 65 76 65 6e 74 2e 6d 65 | 73 73 61 67 65 29 3b 0d |event.me|ssage);.|
|000005c0| 09 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 09 7d 0d |....brea|k;....}.|
|000005d0| 09 09 7d 0d 09 7d 20 77 | 68 69 6c 65 28 21 68 61 |..}..} w|hile(!ha|
|000005e0| 73 51 75 69 74 29 3b 0d | 7d 0d 0d 44 6f 4d 6f 75 |sQuit);.|}..DoMou|
|000005f0| 73 65 44 6f 77 6e 28 29 | 0d 7b 0d 09 73 68 6f 72 |seDown()|.{..shor|
|00000600| 74 09 09 70 61 72 74 3b | 0d 09 57 69 6e 64 6f 77 |t..part;|..Window|
|00000610| 50 74 72 09 77 69 6e 64 | 6f 77 3b 0d 09 6c 6f 6e |Ptr.wind|ow;..lon|
|00000620| 67 09 09 67 72 6f 77 52 | 65 73 75 6c 74 3b 0d 09 |g..growR|esult;..|
|00000630| 52 65 63 74 09 09 67 72 | 6f 77 52 65 63 74 3b 0d |Rect..gr|owRect;.|
|00000640| 09 0d 09 70 61 72 74 20 | 3d 20 46 69 6e 64 57 69 |...part |= FindWi|
|00000650| 6e 64 6f 77 28 65 76 65 | 6e 74 2e 77 68 65 72 65 |ndow(eve|nt.where|
|00000660| 2c 20 26 77 69 6e 64 6f | 77 29 3b 0d 09 73 77 69 |, &windo|w);..swi|
|00000670| 74 63 68 20 28 70 61 72 | 74 29 20 7b 0d 09 63 61 |tch (par|t) {..ca|
|00000680| 73 65 20 69 6e 4d 65 6e | 75 42 61 72 3a 0d 09 09 |se inMen|uBar:...|
|00000690| 64 6f 4d 65 6e 75 28 4d | 65 6e 75 53 65 6c 65 63 |doMenu(M|enuSelec|
|000006a0| 74 28 65 76 65 6e 74 2e | 77 68 65 72 65 29 29 3b |t(event.|where));|
|000006b0| 0d 09 09 62 72 65 61 6b | 3b 0d 09 63 61 73 65 20 |...break|;..case |
|000006c0| 69 6e 44 72 61 67 3a 0d | 09 09 44 72 61 67 57 69 |inDrag:.|..DragWi|
|000006d0| 6e 64 6f 77 28 77 69 6e | 64 6f 77 2c 20 65 76 65 |ndow(win|dow, eve|
|000006e0| 6e 74 2e 77 68 65 72 65 | 2c 20 26 73 63 72 65 65 |nt.where|, &scree|
|000006f0| 6e 42 69 74 73 2e 62 6f | 75 6e 64 73 29 3b 0d 09 |nBits.bo|unds);..|
|00000700| 09 62 72 65 61 6b 3b 0d | 09 63 61 73 65 20 69 6e |.break;.|.case in|
|00000710| 43 6f 6e 74 65 6e 74 3a | 0d 09 09 69 66 20 28 20 |Content:|...if ( |
|00000720| 77 69 6e 64 6f 77 20 21 | 3d 20 46 72 6f 6e 74 57 |window !|= FrontW|
|00000730| 69 6e 64 6f 77 28 29 20 | 29 0d 09 09 09 53 65 6c |indow() |)....Sel|
|00000740| 65 63 74 57 69 6e 64 6f | 77 28 77 69 6e 64 6f 77 |ectWindo|w(window|
|00000750| 29 3b 0d 09 63 61 73 65 | 20 69 6e 47 6f 41 77 61 |);..case| inGoAwa|
|00000760| 79 3a 0d 09 09 53 65 74 | 50 6f 72 74 28 77 69 6e |y:...Set|Port(win|
|00000770| 64 6f 77 29 3b 0d 09 09 | 69 66 20 28 20 54 72 61 |dow);...|if ( Tra|
|00000780| 63 6b 47 6f 41 77 61 79 | 28 77 69 6e 64 6f 77 2c |ckGoAway|(window,|
|00000790| 20 65 76 65 6e 74 2e 77 | 68 65 72 65 29 20 29 0d | event.w|here) ).|
|000007a0| 09 09 09 68 61 73 51 75 | 69 74 20 3d 20 74 72 75 |...hasQu|it = tru|
|000007b0| 65 3b 0d 09 09 62 72 65 | 61 6b 3b 0d 09 63 61 73 |e;...bre|ak;..cas|
|000007c0| 65 20 69 6e 47 72 6f 77 | 3a 0d 09 09 53 65 74 50 |e inGrow|:...SetP|
|000007d0| 6f 72 74 28 77 69 6e 64 | 6f 77 29 3b 0d 09 09 53 |ort(wind|ow);...S|
|000007e0| 65 74 52 65 63 74 28 26 | 67 72 6f 77 52 65 63 74 |etRect(&|growRect|
|000007f0| 2c 20 38 30 2c 20 36 30 | 2c 20 36 30 30 2c 20 35 |, 80, 60|, 600, 5|
|00000800| 30 30 29 3b 0d 09 09 67 | 72 6f 77 52 65 73 75 6c |00);...g|rowResul|
|00000810| 74 20 3d 20 47 72 6f 77 | 57 69 6e 64 6f 77 28 77 |t = Grow|Window(w|
|00000820| 69 6e 64 6f 77 2c 20 65 | 76 65 6e 74 2e 77 68 65 |indow, e|vent.whe|
|00000830| 72 65 2c 20 26 67 72 6f | 77 52 65 63 74 29 3b 0d |re, &gro|wRect);.|
|00000840| 09 09 69 66 20 28 67 72 | 6f 77 52 65 73 75 6c 74 |..if (gr|owResult|
|00000850| 20 21 3d 20 30 29 0d 09 | 09 09 53 69 7a 65 57 69 | != 0)..|..SizeWi|
|00000860| 6e 64 6f 77 28 77 69 6e | 64 6f 77 2c 20 4c 6f 57 |ndow(win|dow, LoW|
|00000870| 6f 72 64 28 67 72 6f 77 | 52 65 73 75 6c 74 29 2c |ord(grow|Result),|
|00000880| 20 48 69 57 6f 72 64 28 | 67 72 6f 77 52 65 73 75 | HiWord(|growResu|
|00000890| 6c 74 29 2c 20 74 72 75 | 65 29 3b 0d 09 09 62 72 |lt), tru|e);...br|
|000008a0| 65 61 6b 3b 0d 09 63 61 | 73 65 20 69 6e 5a 6f 6f |eak;..ca|se inZoo|
|000008b0| 6d 49 6e 3a 0d 09 63 61 | 73 65 20 69 6e 5a 6f 6f |mIn:..ca|se inZoo|
|000008c0| 6d 4f 75 74 3a 0d 09 09 | 53 65 74 50 6f 72 74 28 |mOut:...|SetPort(|
|000008d0| 77 69 6e 64 6f 77 29 3b | 0d 09 09 69 66 20 28 20 |window);|...if ( |
|000008e0| 54 72 61 63 6b 42 6f 78 | 28 77 69 6e 64 6f 77 2c |TrackBox|(window,|
|000008f0| 20 65 76 65 6e 74 2e 77 | 68 65 72 65 2c 20 70 61 | event.w|here, pa|
|00000900| 72 74 29 20 29 20 7b 0d | 09 09 09 45 72 61 73 65 |rt) ) {.|...Erase|
|00000910| 52 65 63 74 28 26 74 68 | 65 50 6f 72 74 2d 3e 70 |Rect(&th|ePort->p|
|00000920| 6f 72 74 52 65 63 74 29 | 3b 0d 09 09 09 5a 6f 6f |ortRect)|;....Zoo|
|00000930| 6d 57 69 6e 64 6f 77 28 | 77 69 6e 64 6f 77 2c 20 |mWindow(|window, |
|00000940| 70 61 72 74 2c 20 77 69 | 6e 64 6f 77 20 3d 3d 20 |part, wi|ndow == |
|00000950| 46 72 6f 6e 74 57 69 6e | 64 6f 77 28 29 29 3b 0d |FrontWin|dow());.|
|00000960| 09 09 09 49 6e 76 61 6c | 52 65 63 74 28 26 74 68 |...Inval|Rect(&th|
|00000970| 65 50 6f 72 74 2d 3e 70 | 6f 72 74 52 65 63 74 29 |ePort->p|ortRect)|
|00000980| 3b 0d 09 09 7d 0d 09 09 | 62 72 65 61 6b 3b 0d 09 |;...}...|break;..|
|00000990| 7d 0d 7d 0d 0d 64 6f 4d | 65 6e 75 28 6d 43 68 6f |}.}..doM|enu(mCho|
|000009a0| 69 63 65 29 0d 6c 6f 6e | 67 09 6d 43 68 6f 69 63 |ice).lon|g.mChoic|
|000009b0| 65 3b 0d 7b 0d 09 69 6e | 74 09 09 09 6d 65 6e 75 |e;.{..in|t...menu|
|000009c0| 49 44 2c 20 6d 65 6e 75 | 49 74 65 6d 3b 0d 09 57 |ID, menu|Item;..W|
|000009d0| 69 6e 64 6f 77 50 74 72 | 09 77 69 6e 64 6f 77 3b |indowPtr|.window;|
|000009e0| 0d 09 52 65 63 74 09 09 | 77 52 65 63 74 3b 0d 09 |..Rect..|wRect;..|
|000009f0| 0d 09 6d 65 6e 75 49 44 | 20 3d 20 48 69 57 6f 72 |..menuID| = HiWor|
|00000a00| 64 28 6d 43 68 6f 69 63 | 65 29 3b 0d 09 6d 65 6e |d(mChoic|e);..men|
|00000a10| 75 49 74 65 6d 20 3d 20 | 4c 6f 57 6f 72 64 28 6d |uItem = |LoWord(m|
|00000a20| 43 68 6f 69 63 65 29 3b | 0d 09 77 69 6e 64 6f 77 |Choice);|..window|
|00000a30| 20 3d 20 46 72 6f 6e 74 | 57 69 6e 64 6f 77 28 29 | = Front|Window()|
|00000a40| 3b 0d 09 0d 09 69 66 20 | 28 6d 65 6e 75 49 44 20 |;....if |(menuID |
|00000a50| 3d 3d 20 31 32 39 29 0d | 09 09 73 77 69 74 63 68 |== 129).|..switch|
|00000a60| 28 6d 65 6e 75 49 74 65 | 6d 29 20 7b 0d 09 09 63 |(menuIte|m) {...c|
|00000a70| 61 73 65 20 31 3a 20 63 | 61 73 65 20 32 3a 20 63 |ase 1: c|ase 2: c|
|00000a80| 61 73 65 20 33 3a 20 63 | 61 73 65 20 34 3a 20 63 |ase 3: c|ase 4: c|
|00000a90| 61 73 65 20 35 3a 0d 09 | 09 09 44 69 73 70 6f 73 |ase 5:..|..Dispos|
|00000aa0| 65 57 69 6e 64 6f 77 28 | 77 69 6e 64 6f 77 29 3b |eWindow(|window);|
|00000ab0| 0d 09 09 09 53 65 74 52 | 65 63 74 28 26 77 52 65 |....SetR|ect(&wRe|
|00000ac0| 63 74 2c 20 36 30 2c 20 | 36 30 2c 20 33 36 30 2c |ct, 60, |60, 360,|
|00000ad0| 20 33 30 30 29 3b 0d 09 | 09 09 77 69 6e 64 6f 77 | 300);..|..window|
|00000ae0| 20 3d 20 4e 65 77 57 69 | 6e 64 6f 77 28 6e 69 6c | = NewWi|ndow(nil|
|00000af0| 2c 20 26 77 52 65 63 74 | 2c 20 22 5c 70 43 68 61 |, &wRect|, "\pCha|
|00000b00| 6e 67 65 64 2e 22 2c 20 | 74 72 75 65 2c 20 31 36 |nged.", |true, 16|
|00000b10| 30 2b 6d 65 6e 75 49 74 | 65 6d 2d 31 2c 20 28 57 |0+menuIt|em-1, (W|
|00000b20| 69 6e 64 6f 77 50 74 72 | 29 2d 31 6c 2c 20 74 72 |indowPtr|)-1l, tr|
|00000b30| 75 65 2c 20 30 6c 29 3b | 0d 09 09 09 62 72 65 61 |ue, 0l);|....brea|
|00000b40| 6b 3b 0d 09 09 63 61 73 | 65 20 36 3a 0d 09 09 09 |k;...cas|e 6:....|
|00000b50| 44 69 73 70 6f 73 65 57 | 69 6e 64 6f 77 28 77 69 |DisposeW|indow(wi|
|00000b60| 6e 64 6f 77 29 3b 0d 09 | 09 09 53 65 74 52 65 63 |ndow);..|..SetRec|
|00000b70| 74 28 26 77 52 65 63 74 | 2c 20 37 30 2c 20 37 30 |t(&wRect|, 70, 70|
|00000b80| 2c 20 33 36 30 2c 20 33 | 30 30 29 3b 0d 09 09 09 |, 360, 3|00);....|
|00000b90| 77 69 6e 64 6f 77 20 3d | 20 4e 65 77 57 69 6e 64 |window =| NewWind|
|00000ba0| 6f 77 28 6e 69 6c 2c 20 | 26 77 52 65 63 74 2c 20 |ow(nil, |&wRect, |
|00000bb0| 22 5c 70 42 61 63 6b 20 | 61 67 61 69 6e 2e 22 2c |"\pBack |again.",|
|00000bc0| 20 74 72 75 65 2c 20 31 | 36 38 2c 20 28 57 69 6e | true, 1|68, (Win|
|00000bd0| 64 6f 77 50 74 72 29 2d | 31 6c 2c 20 74 72 75 65 |dowPtr)-|1l, true|
|00000be0| 2c 20 30 6c 29 3b 0d 09 | 09 09 62 72 65 61 6b 3b |, 0l);..|..break;|
|00000bf0| 0d 09 09 63 61 73 65 20 | 38 3a 0d 09 09 09 68 61 |...case |8:....ha|
|00000c00| 73 51 75 69 74 20 3d 20 | 74 72 75 65 3b 0d 09 09 |sQuit = |true;...|
|00000c10| 09 62 72 65 61 6b 3b 0d | 09 7d 0d 09 48 69 6c 69 |.break;.|.}..Hili|
|00000c20| 74 65 4d 65 6e 75 28 30 | 29 3b 0d 7d 0d 0d 44 6f |teMenu(0|);.}..Do|
|00000c30| 55 70 64 61 74 65 28 77 | 69 6e 64 6f 77 29 0d 57 |Update(w|indow).W|
|00000c40| 69 6e 64 6f 77 50 74 72 | 09 77 69 6e 64 6f 77 3b |indowPtr|.window;|
|00000c50| 0d 7b 0d 09 52 65 63 74 | 09 62 6f 78 3b 0d 09 0d |.{..Rect|.box;...|
|00000c60| 09 53 65 74 50 6f 72 74 | 28 77 69 6e 64 6f 77 29 |.SetPort|(window)|
|00000c70| 3b 0d 09 42 65 67 69 6e | 55 70 64 61 74 65 28 77 |;..Begin|Update(w|
|00000c80| 69 6e 64 6f 77 29 3b 0d | 09 69 66 20 28 20 21 20 |indow);.|.if ( ! |
|00000c90| 45 6d 70 74 79 52 67 6e | 28 77 69 6e 64 6f 77 2d |EmptyRgn|(window-|
|00000ca0| 3e 63 6c 69 70 52 67 6e | 29 20 29 20 7b 0d 09 09 |>clipRgn|) ) {...|
|00000cb0| 50 65 6e 4e 6f 72 6d 61 | 6c 28 29 3b 0d 09 09 45 |PenNorma|l();...E|
|00000cc0| 72 61 73 65 52 67 6e 28 | 77 69 6e 64 6f 77 2d 3e |raseRgn(|window->|
|00000cd0| 63 6c 69 70 52 67 6e 29 | 3b 0d 09 09 53 65 74 52 |clipRgn)|;...SetR|
|00000ce0| 65 63 74 28 26 62 6f 78 | 2c 20 31 30 2c 20 31 30 |ect(&box|, 10, 10|
|00000cf0| 2c 20 32 30 30 2c 20 32 | 30 30 29 3b 0d 09 09 46 |, 200, 2|00);...F|
|00000d00| 69 6c 6c 4f 76 61 6c 28 | 26 62 6f 78 2c 20 26 6c |illOval(|&box, &l|
|00000d10| 74 47 72 61 79 29 3b 0d | 09 09 4f 66 66 73 65 74 |tGray);.|..Offset|
|00000d20| 52 65 63 74 28 26 62 6f | 78 2c 20 31 30 2c 20 2d |Rect(&bo|x, 10, -|
|00000d30| 31 30 29 3b 0d 09 09 46 | 69 6c 6c 4f 76 61 6c 28 |10);...F|illOval(|
|00000d40| 26 62 6f 78 2c 20 26 67 | 72 61 79 29 3b 0d 09 09 |&box, &g|ray);...|
|00000d50| 44 72 61 77 47 72 6f 77 | 49 63 6f 6e 28 77 69 6e |DrawGrow|Icon(win|
|00000d60| 64 6f 77 29 3b 0d 09 7d | 0d 09 45 6e 64 55 70 64 |dow);..}|..EndUpd|
|00000d70| 61 74 65 28 77 69 6e 64 | 6f 77 29 3b 0d 7d 0d 00 |ate(wind|ow);.}..|
|00000d80| 00 00 01 00 00 00 01 1a | 00 00 00 1a 00 00 00 46 |........|.......F|
|00000d90| 00 00 00 1e 00 5f 00 2e | 01 36 08 00 00 00 00 00 |....._..|.6......|
|00000da0| 00 37 00 0a 00 43 00 ee | 80 00 00 00 00 00 00 33 |.7...C..|.......3|
|00000db0| 0b 54 65 73 74 20 63 6f | 64 65 2e 63 02 00 00 00 |.Test co|de.c....|
|00000dc0| 54 45 58 54 4b 41 48 4c | 01 00 00 46 00 39 00 00 |TEXTKAHL|...F.9..|
|00000dd0| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 46 00 39 |..TEXTKA|HL...F.9|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 a0 ac c7 25 00 00 | 0c ff 00 00 01 60 01 76 |.....%..|.....`.v|
|00000e00| 88 02 5e 30 00 00 00 0c | 00 50 00 40 00 cc 01 c0 |..^0....|.P.@....|
|00000e10| 00 86 44 44 00 00 00 46 | 00 03 00 00 00 00 00 60 |..DD...F|.......`|
|00000e20| 00 14 00 74 00 50 04 02 | 4f 4b 00 00 00 00 00 60 |...t.P..|OK.....`|
|00000e30| 00 64 00 74 00 a0 04 06 | 43 61 6e 63 65 6c 00 00 |.d.t....|Cancel..|
|00000e40| 00 00 00 0a 00 20 00 2a | 00 40 a0 02 00 02 00 00 |..... .*|.@......|
|00000e50| 00 00 00 0a 00 6e 00 5a | 01 76 88 02 5e 30 00 00 |.....n.Z|.v..^0..|
|00000e60| 01 00 0f ff fe 00 08 00 | 03 00 08 00 02 80 08 00 |........|........|
|00000e70| 02 40 08 00 02 20 08 00 | 02 10 08 00 03 f8 08 00 |.@... ..|........|
|00000e80| 00 00 00 04 00 06 00 04 | 00 00 00 0e 00 09 0b 50 |........|.......P|
|00000e90| 72 6f 67 72 61 6d 6d 69 | 6e 67 00 00 01 00 00 00 |rogrammi|ng......|
|00000ea0| 01 1a 00 00 00 1a 00 00 | 00 46 00 58 84 5c 12 5e |........|.F.X.\.^|
|00000eb0| 00 00 00 1c 00 46 00 01 | 45 54 41 42 00 00 00 12 |.....F..|ETAB....|
|00000ec0| 45 46 4e 54 00 00 00 1e | 03 ec ff ff 00 00 00 00 |EFNT....|........|
|00000ed0| 00 58 82 d8 03 eb ff ff | 00 00 00 08 00 58 82 f4 |.X......|.....X..|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+